package com.example.chatzsyproject.ui;

import android.os.Bundle;

import androidx.annotation.Nullable;

import com.example.chatzsyproject.R;
import com.example.chatzsyproject.base.BaseActivity;
import com.example.chatzsyproject.fragment.FragmentChat;
import com.hyphenate.easeui.ui.EaseChatFragment;

public class ChatActivity extends BaseActivity {
    EaseChatFragment easeChatFragment;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_chat);
        init();
    }

    public void init() {
        easeChatFragment=new FragmentChat();
//      将参数传到聊天界面
        easeChatFragment.setArguments(getIntent().getExtras());
//      加载easeUi封装的聊天界面的fragment
        getSupportFragmentManager().beginTransaction().add(R.id.ec_layout_container,easeChatFragment).commit();

    }
}
